#include <iostream>
#include <memory>


#include "ThreadPool.hpp"
#include "Task.hpp"

using namespace std;
using namespace ThreadPoolMouble;


int main()
{
    ENABLE_CONSOLE_LOG;
    unique_ptr<ThreadPool<task_t>>  tp=make_unique<ThreadPool<task_t>>();
    tp->Start();

    int cnt = 10;
    char c;
    while (true)
    {
        std::cin >> c;
        tp->Equeue(Push);
         cnt--;
        if(cnt==0) break;
         sleep(1);
    }

    tp->Stop();

    sleep(3);

    tp->Wait();
    return 0;
}